/**
 * 条形图组件
 */

import BaseChart from './BaseChart';

export const BAR_CHART_CONFIG = {
	chart: {
		type: 'bar'
	},
	title: {
		text: '',
	},
	subtitle: {
		text: '',
	},
	xAxis: {
		categories: [ /*'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'*/ ],
		title: {
			text: null
		}
	},
	yAxis: {
		min: 0,
		title: {
			text: '',
			align: 'high'
		},
		labels: {
			overflow: 'justify'
		}
	},
	plotOptions: {
		bar: {
			dataLabels: {
				enabled: true
			}
		}
	},
	legend: {
		layout: 'vertical',
		align: 'right',
		verticalAlign: 'top',
		x: -40,
		y: 80,
		floating: true,
		borderWidth: 1,
		// backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
		shadow: true
	},
	credits: {
		enabled: false
	},
	series: []
}

export default class BarChart extends BaseChart {
	static defaultProps = {
		title: '条形图',
		subtitle: '正在使用条形图',
		yAxisTitle: '描述'
	};

	constructor(props) {
		super(props, BAR_CHART_CONFIG);
	}
}